Transformations of logic programs with goals as arguments
نویسندگان
چکیده
We consider a simple extension of logic programming where variables may range over goals and goals may be arguments of predicates. In this language we can write logic programs which use goals as data. We give practical evidence that, by exploiting this capability when transforming programs, we can improve program efficiency. We propose a set of program transformation rules which extend the familiar unfolding and folding rules and allow us to manipulate clauses with goals which occur as arguments of predicates. In order to prove the correctness of these transformation rules, we formally define the operational semantics of our extended logic programming language. This semantics is a simple variant of LD-resolution. When suitable conditions are satisfied this semantics agrees with LD-resolution and, thus, the programs written in our extended language can be run by ordinary Prolog systems. Our transformation rules are shown to preserve the operational semantics and termination.
منابع مشابه
A method for removing unused arguments from logic programs
This paper studies the problem of removing unused arguments from logic programs which have been constructed by a schema-based method. Our schemabased method constructs logic programs semiautomatically. These programs have clear structure which depicts the design decisions that have been taken for their construction. On the other hand, these programs have unused arguments. We propose a method th...
متن کاملInput/Output Dependencies of Normal Logic Programs
SLDNF-resolution is complete for allowed programs and allowed queries. But the condition of allowedness is very stringent and excludes many common Prolog constructs. We show that allowedness is a special case of a more general principle. We show that if the clauses of a normal program are correct with respect to an input/output specification then SLDNFresolution is complete for it. An input/out...
متن کاملSpecialization of Prolog Programs with Partially Static Goals and Binarization
This thesis presents two new methods that specialize ordinary and binary Prolog programs and compares them with current approaches. The first method is based on the new notion of partially static goals. Partially static goals generalize binding environments. More information can be propagated for specialization. The method is well suited for application in fold/unfold transformation systems. Th...
متن کاملOn Optimization of Monadic Logic Programs
The article is devoted to the optimization of monadic logic programs and goals (programs and goals, which do not use functional symbols of arity > 1 and use only predicate symbols of arity 1). A program P is terminating with respect to a goal G, if an SLD-tree of P and G is finite. In general, monadic programs are not terminating. Program and goal transformations are introduced, by which a mona...
متن کاملRepresenting Argumentation Frameworks in Answer Set Programming
This paper studies representation of argumentation frameworks (AFs) in answer set programming (ASP). Four different transformations from AFs to logic programs are provided under the complete semantics, stable semantics, grounded semantics and preferred semantics. The proposed transformations encode labelling-based argumentation semantics at the object level, and different semantics of AFs are u...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- TPLP
دوره 4 شماره
صفحات -
تاریخ انتشار 2004